<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition>
            <div id="post">
                <div id="stylized" class="questao">

                    <h3>Questao</h3>

                    <c:set var="questaoTemp" value="#{QuestaoController.questaoAux}" />

                    <ui:include src="../questao/questaoView.xhtml" id="questaoView" />

                    <br />
                    <h3>Conteudos Associados</h3>
                    <!--                    <h:commandButton styleClass="button" id="addConteudo2" onclick="dlgConteudo.show();" type="button" value="Add Conteudo" />-->
                    <h:commandButton styleClass="button" id="addConteudo" action="#{PageManager.setModalConteudoPesquisa}" value="Add Conteudo" />
                    <br />
                    <p:dataTable var="questaoAbordaConteudoTemp" value="#{QuestaoProfessorController.questaoProfessor.questaoAbordaConteudos}" emptyMessage="Nenhum Arquivo Encontrado" style="margin-top: 20px;">
                        <p:column sortBy="#{questaoAbordaConteudoTemp.conteudo.conteudo}" style="width: 300px;">
                            <f:facet name="header">
                                <h:outputText value="Conteudo" />
                            </f:facet>
                            <h:outputText value="#{questaoAbordaConteudoTemp.conteudo.conteudo}" />
                        </p:column>

                        <p:column style="text-align: center;" >
                            <f:facet name="header">
                                <h:outputText value="Painel" />
                            </f:facet>
                            <p:commandButton image="ui-icon ui-icon-close" title="excluir" actionListener="#{QuestaoProfessorController.removeConteudo}" ajax="false" />
                        </p:column>
                    </p:dataTable>


                    <h:commandButton styleClass="button" id="salvar" action="#{QuestaoProfessorController.persiste}" value="Salvar" />

                </div>
            </div>

        </ui:composition>

    </body>
</html>
